import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Data {
	static String FILE_NAME = "data.csv";
	static String SPLIT_TOKEN = ";";
	static String[] HEADER;
	static double[][] DATA;
	static double[] LABEL;
	static int COLS;
	static int ROWS;

	public static void main(String[] args) {
		tryRead();
		printData();
	}

	static void tryRead() {
		try {
			read();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	static void read() throws Exception {
		File file = new File(FILE_NAME);
		BufferedReader bufRdr = new BufferedReader(new FileReader(file));
		HEADER = bufRdr.readLine().split(SPLIT_TOKEN);
		COLS = HEADER.length - 1;
		ROWS = 0;

		DATA = new double[(int) file.length()][COLS];
		LABEL = new double[(int) file.length()];

		String line = null;
		while ((line = bufRdr.readLine()) != null) {
			StringTokenizer st = new StringTokenizer(line, SPLIT_TOKEN);

			for (int c = 0; c < COLS; c++) {
				DATA[ROWS][c] = Double.valueOf(st.nextToken());
			}
			LABEL[ROWS] = Double.valueOf(st.nextToken());
			ROWS++;
		}
		bufRdr.close();

		DATA = Arrays.copyOf(DATA, ROWS);
		LABEL = Arrays.copyOf(LABEL, ROWS);
	}

	static void printData() {
		for (int r = 0; r < LABEL.length; r++) {
			System.out.printf("%3.3f\n", LABEL[r]);

			for (int c = 0; c < COLS; c++) {
				System.out.printf("%3.3f", DATA[r][c]);
			}
		}
	}
}
